﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;

namespace TravianHelper
{
    public class VillageInfo
    {
        public int lumber;
        public int clay;
        public int iron;
        public int crop;
        public int maxStore;
        public int maxCrop;
        public ArrayList resFields;
        public bool buildBusy;
        public int x;
        public int y;
        public Hashtable troops;
        public int waves;

        public int getTroopCount(string name)
        {
            if (troops[name] == null)
            {
                return 0;
            }
            else
            {
                return (int)troops[name];
            }
        }

        public int getLevel(string buildLink)
        {
            for (int i = 0; i < resFields.Count; i++)
            {
                ResourceField res = (ResourceField)resFields[i];
                if (res.buildLink.Equals(buildLink))
                {
                    return res.level;
                }
            }
            return -1;
        }
    }
}
